package com.uls.ldcm.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.uls.ldcm.domain.vo.TaskCommentVo;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.uls.common.annotation.Excel;
import com.uls.common.core.domain.BaseEntity;

/**
 * 薪资发放管理对象 lb_salarypayments
 *
 * @author gw
 * @date 2024-11-11
 */
public class Salarypayments extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 薪资发放记录唯一标识
     */
    private Long paymentId;

    /**
     * 劳务人员ID
     */
    @Excel(name = "劳务人员ID")
    private Long laborerId;

    private String name;

    /**
     * 发放日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发放日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date paymentDate;

    /**
     * 发放金额
     */
    @Excel(name = "发放金额")
    private BigDecimal amount;

    /**
     * 发放方式
     */
    @Excel(name = "发放方式")
    private Integer paymentMethod;

    /**
     * 工资条
     */
    @Excel(name = "工资条")
    private String payslip;

    /**
     * 创建时间
     */
    private Date createdAt;

    /**
     * 更新时间
     */
    private Date updatedAt;



    /**
     *流程id
     *
    */
    private Long flowInstantId;

    /**
     *状态
     *
    */
    private Integer status;

    /**
     *是否同意
     *
    */
    private Integer agree;
    /**
     *审批意见
     *
    */
    private String comment;
    /*
    * 打回方式
    * 0：信息有误
    * 1：数据有误
     *
    */
    private Integer manner;

    //    基本工资
    private BigDecimal basicSalary;

    /** 奖金 */
    private BigDecimal bonus;

    /** 津贴 */
    private BigDecimal allowances;

    /** 加班小时数 */
    private BigDecimal overtimeHours;

    /** 加班费 */
    private BigDecimal overtimePay;

    private List<TaskCommentVo> taskCommentVoList;

    public BigDecimal getBasicSalary() {
        return basicSalary;
    }

    public void setBasicSalary(BigDecimal basicSalary) {
        this.basicSalary = basicSalary;
    }

    public BigDecimal getBonus() {
        return bonus;
    }

    public void setBonus(BigDecimal bonus) {
        this.bonus = bonus;
    }

    public BigDecimal getAllowances() {
        return allowances;
    }

    public void setAllowances(BigDecimal allowances) {
        this.allowances = allowances;
    }

    public BigDecimal getOvertimeHours() {
        return overtimeHours;
    }

    public void setOvertimeHours(BigDecimal overtimeHours) {
        this.overtimeHours = overtimeHours;
    }

    public BigDecimal getOvertimePay() {
        return overtimePay;
    }

    public void setOvertimePay(BigDecimal overtimePay) {
        this.overtimePay = overtimePay;
    }

    public Integer getManner() {
        return manner;
    }

    public void setManner(Integer manner) {
        this.manner = manner;
    }

    public List<TaskCommentVo> getTaskCommentVoList() {
        return taskCommentVoList;
    }

    public void setTaskCommentVoList(List<TaskCommentVo> taskCommentVoList) {
        this.taskCommentVoList = taskCommentVoList;
    }

    public Integer getAgree() {
        return agree;
    }

    public void setAgree(Integer agree) {
        this.agree = agree;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public Long getFlowInstantId() {
        return flowInstantId;
    }

    public void setFlowInstantId(Long flowInstantId) {
        this.flowInstantId = flowInstantId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setPaymentId(Long paymentId) {
        this.paymentId = paymentId;
    }

    public Long getPaymentId() {
        return paymentId;
    }

    public void setLaborerId(Long laborerId) {
        this.laborerId = laborerId;
    }

    public Long getLaborerId() {
        return laborerId;
    }

    public void setPaymentDate(Date paymentDate) {
        this.paymentDate = paymentDate;
    }

    public Date getPaymentDate() {
        return paymentDate;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setPaymentMethod(Integer paymentMethod) {
        this.paymentMethod = paymentMethod;
    }

    public Integer getPaymentMethod() {
        return paymentMethod;
    }

    public void setPayslip(String payslip) {
        this.payslip = payslip;
    }

    public String getPayslip() {
        return payslip;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("paymentId", getPaymentId())
                .append("laborerId", getLaborerId())
                .append("name", getName())
                .append("paymentDate", getPaymentDate())
                .append("amount", getAmount())
                .append("paymentMethod", getPaymentMethod())
                .append("payslip", getPayslip())
                .append("createBy", getCreateBy())
                .append("createdAt", getCreatedAt())
                .append("updateBy", getUpdateBy())
                .append("updatedAt", getUpdatedAt())
                .toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Salarypayments that = (Salarypayments) o;
        return Objects.equals(paymentId, that.paymentId) &&
                Objects.equals(laborerId, that.laborerId) &&
                Objects.equals(name, that.name) &&
                Objects.equals(paymentDate, that.paymentDate) &&
                Objects.equals(amount, that.amount) &&
                Objects.equals(paymentMethod, that.paymentMethod) &&
                Objects.equals(payslip, that.payslip) &&
                Objects.equals(createdAt, that.createdAt) &&
                Objects.equals(updatedAt, that.updatedAt) &&
                Objects.equals(flowInstantId, that.flowInstantId) &&
                Objects.equals(status, that.status) &&
                Objects.equals(agree, that.agree) &&
                Objects.equals(comment, that.comment) &&
                Objects.equals(manner, that.manner) &&
                Objects.equals(taskCommentVoList, that.taskCommentVoList);
    }

    @Override
    public int hashCode() {
        return Objects.hash(paymentId, laborerId, name, paymentDate, amount, paymentMethod, payslip, createdAt, updatedAt, flowInstantId, status, agree, comment, manner, taskCommentVoList);
    }
}
